# while循环遍历列表
def list_while_func():
    my_list = ["一二三", "Python", 99, -1+1j]
    count = 0
    while count < len(my_list):
        print(f"列表中的元素为:{my_list[count]}")
        count += 1
# for循环遍历列表
def list_for_func():
    mylist = [1, 2, 3, 5, 7, 11]
    for x in mylist:
        print(f"列表中的元素为:{x}")

list_while_func()
print("--------------------------")
list_for_func()